package com.example.springboot.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 模型表
 * </p>
 *
 * @author jiang
 * @since 2025-04-17
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("model")
@Schema(name = "ModelEntity", description = "模型表")
public class ModelEntity extends Model<ModelEntity> {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "模型名称")
    @TableField("name")
    private String name;

    @Schema(description = "模型内容")
    @TableField("content")
    private String content;

    @Schema(description = "创建时间")
    @TableField("current")
    private Date current;

    @Schema(description = "头像")
    @TableField("avatar")
    private String avatar;

    public static final String ID = "id";

    public static final String NAME = "name";

    public static final String CONTENT = "content";

    public static final String CURRENT = "current";

    public static final String AVATAR = "avatar";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
